﻿@using WineStore.Extends;
@using PagedList.Mvc;
@using PagedList;
@model PagedList.IPagedList<WineStore.Models.Sim>
@{
    Layout = null;
}

<style type="text/css">
    input, textarea, select {
        padding: 5px;
        border: 1px solid #ccc;
        border-radius: 3px;
        width: 200px;
        color: #333;
        box-shadow: rgba(0,0,0,0.1)0px 0px 8px;
        -moz-box-shadow: rgba(0,0,0,0.1)0px 0px 8px;
        -webkit-box-shadow: rgba(0,0,0,0.1)0px 0px 8px;
    }

    textarea {
        width: 400px;
        height: 100px;
        max-width: 400px;
        line-height: 18px;
        border-radius: 3px;
    }


        input:hover, textarea:hover, select:hover input:focus, textarea:focus, select:focus {
            border-color: 10px solid #C9C9C9;
            box-shadow: rgba(0,0,0,0.2)0px 0px 8px;
            -moz-box-shadow: rgba(0,0,0,0.2)0px 0px 8px;
            -webkit-box-shadow: rgba(0,0,0,0.2)0px 0px 8px;
            border-radius: 3px;
        }

    input .submit {
        height: 38px;
        background-color: #474E69;
        color: #FFF;
        border-radius: 3px;
        -moz-border-radius: 3px;
        -webkit-border-radius: 3px;
    }
</style>
<link href="../../Content/styletablesim.css" rel="stylesheet" />
<script src="../../Scripts/jquery-1.4.4.min.js"></script>
<script type="text/javascript">
    $(function () {
        /* For zebra striping */
        $("table tr:nth-child(odd)").addClass("odd-row");
        /* For cell text alignment */
        $("table td:first-child, table th:first-child").addClass("first");
        /* For removing the last border */
        $("table td:last-child, table th:last-child").addClass("last");
    });
</script>
<!--Sử dụng cho row hover-->
<script type="text/javascript">
    $(document).ready(function () {
        $("tr").not(':first').hover(function () {
            $(this).css("background", "#D1EEEE");
        }, function () {
            $(this).css("background", "");
        }
        );
    });
</script>

<table border="1px;" style="width: 100%">
    <tr>
        <th>Tên nhà mạng
        </th>
        <th>Tên nhóm
        </th>
        <th>Số Sim
        </th>
        <th>Giá sim
        </th>
        <th>Ghi chú
        </th>
        
        <th>Sự kiện
        </th>
    </tr>
    @foreach (var item in Model)
    {
        <tr>
            <td style="color: #006666; font-weight: bold;">
                @Html.DisplayFor(sim => item.Supplier.SupplierName)
            </td>
            <td style="color: #006666; font-weight: bold;">
                @Html.DisplayFor(sim => item.CategorySim.CategorySimName)
            </td>
            <td style="color: #006666; font-weight: bold;">
                @Html.DisplayFor(sim => item.SimNumber)
            </td>
            <td style="color: #CC0000; font-weight: bold;">
                @Html.DisplayFor(sim => item.SimPrice) đ
            </td>
            <td style="color: #006666; font-weight: bold;">
                @Html.DisplayFor(sim => item.SimNotice)
            </td>
            
            <td>
                @Html.ActionLink("Sửa", "EditSim", new { id = item.SimId }, new { @class = "edit" })
                @Html.ActionLink("Xóa", "DeleteSim", new { id = item.SimId }, new { @class = "edit" })
            </td>
        </tr>
    }
    <tr>
        <td colspan="9" style="text-align: right;">
            @Html.ActionLink("Thêm mới", "CreateSim", null, new { @class = "edit" })
        </td>
    </tr>
</table>
<!--Paging-->
<div>
    <div style="float: left;">
        @Html.PagedListPager(Model, page => Url.Action("ShowSim", new { page = page, sortOrder = ViewBag.CurrentSort, currentFilter1 = ViewBag.CurrentFilter1 }), (PagedListRenderOptions)ViewBag.Pro)
    </div>
</div>
